
#ifndef IRIDE_VECTOR4_H_
#define IRIDE_VECTOR4_H_

#include <string>
#include "Types.h"
#include "Vector3.h"
#include "stddef.h"

namespace Iride
{
	class Vector4
	{

	public:

		Real x;
		Real y;
		Real z;
		Real w;

		Vector4();
		Vector4(Real value);
		Vector4(const Vector3 &vec);
		Vector4(Real fx, Real fy, Real rz, Real fw);

		void Swap(Vector4 &rOther);

		Vector4 & operator= (const Vector3 & other);

		Real 	operator[] (const size_t i) const;
		Real& 	operator[] (const size_t i);

		Vector4 operator - ( void ) const;

		Vector4 operator + (const Vector4&) const;
		Vector4 operator - (const Vector4&) const;
		Vector4 operator * (const Real&) const;
		Vector4 operator / (const Real&) const;

		Vector4& operator+= (const Vector4&);
		Vector4& operator-= (const Vector4&);

		Vector4 Cross (const Vector4& vec) const;

		bool Normalize(void);	// It normalizes only x, y and z

		Real Length() const;	// Length of homogenous vector (only x, y and z are used)

		Vector3 ToVector3();

		static Vector4 Lerp(Vector4, Vector4, Real);

		static const Vector4 Zero;

		std::string ToString() const;
	};
};

#endif


